<!-- 报告详情弹窗 -->
<u-popup :show="showReportPopup" @close="showReportPopup = false" mode="center" :closeable="true" :round="10" :safe-area-inset-bottom="true">
    <view class="report-detail-popup">
        <view class="popup-title">面试报告详情</view>
        <view class="detail-content" v-if="currentReport">
            <!-- 调试信息 -->
            <view class="debug-info">
                <text>数据加载状态: {{!!currentReport}}</text>
            </view>
            
            <view class="detail-item">
                <text class="detail-label">面试职位：</text>
                <text class="detail-value">{{currentReport.positionName || '暂无数据'}}</text>
            </view>
            <view class="detail-item">
                <text class="detail-label">面试时间：</text>
                <text class="detail-value">{{currentReport.generateTime || '暂无数据'}}</text>
            </view>
            <view class="scores-section">
                <view class="section-title">评分详情</view>
                <view v-if="currentReport.dimensionDetails && currentReport.dimensionDetails.length > 0">
                    <view class="score-item" v-for="(dimension, idx) in currentReport.dimensionDetails" :key="idx">
                        <text class="score-name">{{dimension.dimensionName || '未知维度'}}：</text>
                        <text class="score-number">{{dimension.score || 0}}分</text>
                        <text class="dimension-weight">(权重: {{dimension.weight || 0}})</text>
                    </view>
                </view>
                <view v-else class="no-data">暂无评分详情</view>
                <view class="total-score">
                    <text class="total-label">总分：</text>
                    <text class="total-value">{{currentReport.overallScore || 0}}分</text>
                </view>
            </view>
            <view class="evaluation-section">
                <view class="section-title">综合评价</view>
                <text class="evaluation-text">{{currentReport.overallEvaluation || '暂无评价'}}</text>
            </view>
            <view class="analysis-section">
                <view class="section-title">优势分析</view>
                <text class="analysis-text">{{currentReport.strengths || '暂无分析'}}</text>
                <view class="section-title" style="margin-top: 20rpx;">不足分析</view>
                <text class="analysis-text">{{currentReport.weaknesses || '暂无分析'}}</text>
            </view>
            <view class="suggestion-section">
                <view class="section-title">改进建议</view>
                <text class="suggestion-text">{{currentReport.suggestions || '暂无建议'}}</text>
            </view>
        </view>
    </view>
</u-popup>

<style lang="scss">
.report-detail-popup {
    width: 90%;
    max-width: 600rpx;
    padding: 40rpx;
    max-height: 80vh;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 16rpx;
    
    .debug-info {
        padding: 10rpx;
        margin-bottom: 20rpx;
        border: 1px solid #d9d9d9;
        border-radius: 4rpx;
        font-size: 24rpx;
        color: #666;
    }
}
</style> 